package com.i2863.tools.weixinmp.service;


import com.i2863.tools.weixinmp.dao.mapper.NewsMapper;
import com.i2863.tools.weixinmp.domain.NewsInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by xuweiwei on 2017/3/10.
 */
@Service("newsService")
public class NewsService {

    private static final Logger logger = LoggerFactory.getLogger(NewsService.class);

    @Resource
    private NewsMapper mapper;


    public List<NewsInfo> getNewsBySource(String source){
        return mapper.getNewsBySource(source);
    }

    public NewsInfo getNewsInfoById(Integer id){
        return mapper.getNewsInfoById(id);
    }
}
